<template>
	<view>
		<tn-sign-board :show="showSign" :customBarHeight="45" @closed="navBack" @save="saveSign"></tn-sign-board>
	</view>
</template>

<script>
export default {
	name: 'sign-board',
	data() {
		return {
			showSign: false,
			name: ''
		};
	},
	onLoad(data) {
		this.name = data.name;
	},
	onReady() {
		this.showSign = true;
	},
	methods: {
		saveSign(e) {
			const eventChannel = this.getOpenerEventChannel();
			eventChannel.emit('acceptDataFromOpenedPage', { data: e, name: this.name });
			this.navBack();
		},
		navBack() {
			uni.navigateBack();
		}
	}
};
</script>

<style lang="scss"></style>
